package controller

import (
	"common-admin/model"
	"github.com/gin-gonic/gin"
	"net/http"
)

var menu model.Menu

func Test(c *gin.Context) {
	//menudata := menu.MenuList()
	menus := menu.FindAll()
	//menudata := menu.MenuTree(menus, 0)
	menudata := menu.MenuTree2(menus, 0)
	c.JSON(http.StatusOK, menudata)
}
